package com.fancyears.clientfunction.dao;

/**
 * @Author: fancyears·milos·malvis
 * @Description:
 * @Date: Created in  2019/1/21 16:22
 * @Modified By:
 */
public interface BaseDao<T> {
    /**
     * 主键查询
     *
     * @param param
     * @return
     */
    T selectByPrimaryKey(Object param) throws Exception;

    /**
     * 主键删除
     *
     * @param param
     * @return
     */
    int deleteByPrimaryKey(Object param) throws Exception;

    /**
     * 全插入(可批量插入，依赖SQL的写法)
     *
     * @param param
     * @return
     */
    int insert(Object param) throws Exception;

    /**
     * 选择插入(可批量插入，依赖SQL的写法)
     *
     * @param param
     * @return
     */
    int insertSelective(Object param) throws Exception;

    /**
     * 主键选择更新
     *
     * @param param
     * @return
     */
    int updateByPrimaryKeySelective(Object param) throws Exception;

    /**
     * 主键全部更新
     *
     * @param param
     * @return
     */
    int updateByPrimaryKey(Object param) throws Exception;
}
